<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>成都家政服务系统</title>
    <!-- Bootstrap core CSS -->
    <link href="{{asset('layui/css/layui.css')}}" rel="stylesheet" media="all">
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{asset('bootstrap/css/dashboard.css')}}">
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap-theme.min.css')}}">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="{{asset('layui/layui.js')}}" charset="utf-8"></script>
    <script src="{{asset('jquery.js')}}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{{asset('bootstrap/js/bootstrap.min.js')}}"></script>
</head>
<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">成都家政服务系统</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">成都家政服务系统</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="javascript:;">{{session("employee_name")}}，欢迎您</a></li>
                <li><a href="javascript:;">职位：{{session("employee_power")}}</a></li>
                <li><a href="/adminLogout" style="color: red">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-2 sidebar">
            <ul class="nav nav-sidebar">
                <li><a href="javascript:;" style="background-color: lightgrey"><h4><strong>人员</strong></h4></a></li>
                <li><a href="/searchEmployee">查看员工</a></li>
                <li><a href="/checkEmployee">审核申请</a></li>
            </ul>
            <ul class="nav nav-sidebar">
                <li><a href="javascript:;" style="background-color: lightgrey"><h4><strong>区域</strong></h4></a></li>
                <li  class="active"><a href="/areaManage">区域管理</a></li>
            </ul>
            <ul class="nav nav-sidebar">
                <li><a href="javascript:;" style="background-color: lightgrey"><h4><strong>财务</strong></h4></a></li>
                <li><a href="/searchMoney">财务统计</a></li>
            </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h2 class="page-header">{{$nowArea->area_name}}</h2>

            <div class="panel-body" >
                <hr>
                <div class="col-md-8" >
                    <h4>建立日期：{{$nowArea->area_time}}</h4>
                    <br>
                    <h4>备注：{{$nowArea->area_info}}</h4>
                </div>
                <div class="col-md-4 well">
                    <h3>区域负责人：{{$nowArea->area_manage}}</h3>
                    <br>
                    <button type="button" class="btn btn-warning btn-block  btn-sm" data-toggle="modal" data-target="#upArea">更换部门经理</button>
                </div>
                <!--修改区域模态框-->
                <div class="modal fade" id="upArea" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                <h4 class="modal-title" id="myModalLabel1">当前区域：{{$nowArea->area_name}}</h4>
                            </div>
                            <div class="modal-body">
                                <form action="/upArea" method="post">
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <input type="hidden" name="area_id" value="{{$nowArea->area_id}}">
                                    <h5>区域部长：</h5>
                                    <select class="form-control" name="area_manage" >
                                        @foreach($areaData as $value)
                                            <option value="{{$value->employee_id}}" >{{$value->employee_id}}：{{$value->employee_name}}</option>
                                        @endforeach
                                    </select>
                            </div>
                            <div class="modal-footer">
                                <button type="submit" class="btn btn-warning">确定</button>
                                <button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <hr>
            </div>
        </div>
    </div>
</div>
</body>
</html>